﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using MiddlewareCore;
using MiddlewareCore.Application;

namespace NetFramworkDemo
{
    public class Startup: IStartUp
    {
        public void Configure(IApplicationBuilder app)
        {
            app.Use((next) => { return async (context) => { await Task.Delay(5000); Console.WriteLine("此中间件delay 5秒"); Console.WriteLine("这是第一个中间件………"); await next.Invoke(context); }; });
            app.UseMiddleware<TestMiddleware>();
        }

        public void ConfigureServices(MiddlewareCore.Services.IServiceCollection services)
        {
           
        }
    }
}
